import request from '@/utils/request'

// 查询列表
export function getBatchList(query) {
  return request({
    url: '/md/payeeBatch/list',
    method: 'get',
    params: query
  })
}

// 查询详细
export function batchDetail(batchId) {
  return request({
    url: '/md/payeeBatch/' + batchId,
    method: 'get'
  })
}

// 新增
export function addBatch(data) {
  return request({
    url: '/md/payeeBatch',
    method: 'post',
    data: data,
    dataType: "json",
    processData: false,
    contentType: false,
    cache: false,
  })
}

// 修改
export function updateBatch(data) {
  return request({
    url: '/md/payeeBatch',
    method: 'put',
    data: data
  })
}

// 删除
export function delBatch(exchangeId) {
  return request({
    url: '/md/payeeBatch/' + exchangeId,
    method: 'delete'
  })
}

// 修改状态
export function changeBatchStatus(data) {
  return request({
    url: '/md/payeeBatch/updateStatus',
    method: 'put',
    data: data
  })
}

// 提交审核/撤销审核
export function updateAuditStatus(data) {
  return request({
    url: '/md/payeeBatch/updateAuditStatus',
    method: 'put',
    data: data
  })
}

// 审核通过/驳回(管理员审核)
export function changeAuditStatus(data) {
  return request({
    url: '/md/payeeBatch/audit',
    method: 'put',
    data: data
  })
}
